package datastructure.queue;

import datastructure.common.List;
import datastructure.linkedlist.sigle.CyLinkedList;

/**
 * @author cyt
 * @create 2020-12-05 17:57
 */
public class Queue<E> {
    private List<E> list = new CyLinkedList<>();

    public E front() {
        return list.get(0);
    }

    public E dnQueue() {
        return list.remove(0);
    }

    public void enQueue(E element) {
        list.add(element);
    }

    public int size() {
        return list.size();
    }


    public boolean isEmpty() {
        return list.isEmpty();
    }
}
